package com.fs.common.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fs.common.annotation.ColumnDesc;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author DeveloperKK
 * @desc 检查记录表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("yz_check_note")
@EqualsAndHashCode(callSuper=false)
public class CheckNote extends Model<CheckNote> {

    /**
     * 待检查
     */
    public static final int WAIT_CHECK = -1;

    /**checkStatus
     * 检查中
     */
    public static final int CHECKING = 0;
    /**
     * 已检查
     */
    public static final int CHECKED = 1;

    /**
     * 菜谱已生成
     */
    public static final int FINISH = 2;

    @TableId(type = IdType.INPUT, value = "check_id")
    private String checkId;

    @ColumnDesc(name = "产妇手机号")
    @TableField(value = "maternal_mobile")
    private String maternalMobile;

    @ColumnDesc(name = "产妇姓名")
    @TableField(value = "maternal_name")
    private String maternalName;

    @ColumnDesc(name = "分娩日期")
    @JSONField(format="yyyy-MM-dd")
    @TableField(value = "delivery_day")
    private Date deliveryDay;

    @ColumnDesc(name = "分娩方式 0顺产 1剖腹产")
    @TableField(value = "delivery_type")
    private Integer deliveryType = 0;

    @ColumnDesc(name = "喂养方式 0母乳 1奶粉")
    @TableField(value = "feed_type")
    private Integer feedType = 0;

    @ColumnDesc(name = "民族")
    @TableField(value = "maternal_nation")
    private String maternalNation;

    @ColumnDesc(name = "检测地址")
    @TableField(value = "address")
    private String address;

    @ColumnDesc(name = "忌口")
    @TableField(value = "avoid_food")
    private String avoidFood;

    @ColumnDesc(name = "房间号")
    @TableField(value = "room_number")
    private String roomNumber;

    @ColumnDesc(name = "检查状态 -1待检查 0检查中 1已检查 2已生成菜谱")
    @TableField(value = "check_status")
    private Integer checkStatus = -1;

    @ColumnDesc(name = "检查结果 0面失败 1舌失败 2全失败 3成功")
    @TableField(value = "check_result")
    private Integer checkResult = -1;

    @ColumnDesc(name = "json格式化检查内容")
    @TableField(value = "check_json")
    private String checkJson;

    @ColumnDesc(name = "检查文字记录")
    @TableField(value = "check_words")
    private String checkWords;

    @ColumnDesc(name = "检查得分记录")
    @TableField(value = "check_score")
    private String checkScore;

    @ColumnDesc(name = "创建时间")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    @TableField(value = "create_time")
    private Date createTime = new Date();

    @ColumnDesc(name = "创建用户ID")
    @TableField(value = "creater_id")
    private String createrId;

}
